package com.service;

import com.dao.TypeDao;
import com.entity.Types;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liuronghua
 * @version 1.0
 * @data 2020-09-2020/9/22 9:47
 * @desc
 */
@Service
public class TypeService {
    @Autowired
    private TypeDao typeDao;

    public List<Types> getList(){return typeDao.selectList();}



    public List<Types> findAll(int id,String name,int num){
        return typeDao.findAll(id,name,num);
    }
    /**
     * 通过id查询
     * @param id
     * @return
     */
    public Types get(int id){
        return typeDao.select(id);
    }

}
